from datetime import datetime

timestamp = datetime.now().timestamp() // 600 * 600
formatedate=datetime.fromtimestamp(timestamp).strftime('%Y%m%d%H%M')
print(formatedate)

strdate = "20240101"
ptime = datetime.strptime(strdate, '%Y%m%d').timestamp()
print(ptime)